"use client";
import Title from "antd/es/typography/Title";
import { message } from "antd";
import QuestionTable from "@/components/QuestionTable";
import "./index.css";

interface Props {
  searchParams: {
    q?: string;
  };
}

/**
 * 题目列表页面
 * @constructor
 */
export default function QuestionsPage({ searchParams }: Props) {
  // 获取 url 的查询参数
  const { q: searchText } = searchParams;

  return (
    <div id="questionsPage" className="max-width-content">
      <Title level={3}>题目大全</Title>
      <QuestionTable
        defaultSearchParams={{
          searchText,
        }}
      />
    </div>
  );
}
